package com.example.scaffold.organization.bean;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 机构DTO对象
 * 遵循阿里手册：数据对象命名规范，参数校验规范
 *
 * @author example
 */
@Data
@Schema(description = "机构信息DTO")
public class OrganizationDTO {
    @Schema(description = "机构ID")
    private Long id;

    @Schema(description = "上级机构ID", example = "0")
    private Long parentId;

    @NotBlank(message = "机构名称不能为空")
    @Size(min = 1, max = 50, message = "机构名称长度必须在1-50个字符之间")
    @Schema(description = "机构名称", example = "技术部")
    private String name;

    @Schema(description = "状态(0-禁用,1-正常)", example = "1")
    private Integer status;

    @Schema(description = "标记", example = "true")
    private Boolean flag;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    private LocalDateTime updateTime;
}